using System;
using L=Science.Physics.GeneralPhysics;

namespace Serway.Chapter14
{
	/// <summary>
	/// Example03: A Pain in Your Ear
	/// Estimate the force exerted on your eardrum to the water 
	/// above when you are swimming at the bottom of a pool that 
	/// is 5.0 m deep.
	/// P_{bot} - P_0 = 4.9\times 10^4 Pa
	/// </summary>
	public class Example03
	{
		public Example03()
		{
		}
		private string result;
		public string Result
		{
			get{return result;}
		}
		public void Compute()
		{
			L.Pressure p = new L.Pressure();
			p.atm = 1.0;
			result += Convert.ToString(p.Pa)+"\r\n";
			L.Density rho = new L.Density();
			rho.kgPERmCUBE = 1000.0;
			L.Fluid water = new L.Fluid(rho);
			L.Length depth = new L.Length();
			depth.m = 5.0;
			L.Pressure p2 = water.PressureAtDepth(depth);
			result += Convert.ToString(p2.Pa - p.Pa)+"\r\n";
		}
	}
}
